package com.zl.aop;

import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;

/**
 * @author ZLL
 * @date create in 2018/05/09
 */
@Aspect
public class AopBean {

    @AfterThrowing(value = "execution(* com.zl.aop.TestBean.*(..))")
    public void afterAnyMethod() {
        System.out.println("@After AOP afterAnyMethod(), execution point: '* *.*(..)'");
    }

    @AfterThrowing(value = "execution(* com.zl.aop.TestBean.*(..))", throwing = "e")
    public void afterGreeting(NotAGreetingException e) {
        System.out.println("@After AOP afterGreeting(), execution point: '* *.*(..)' e<" + e + ">");
    }
}
